% random sampling

sample_size = 50/100 * size(data,1);
nrep = 1000;

for i = 1:nrep
    index = randsample(1:size(data,1), sample_size);
    
    q1(i) = sum(data{index,6});
    q2(i) = sum(data{index,7});
    q3(i) = sum(data{index,8});
    q4(i) = sum(data{index,9});
end

mean(q1)/sample_size * 100
mean(q2)/sample_size * 100
mean(q3)/sample_size * 100
mean(q4)/sample_size * 100